package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UserPartyFilesMapper;
import com.ruoyi.system.domain.UserPartyFiles;
import com.ruoyi.system.service.IUserPartyFilesService;

/**
 * 党员发展文件Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-25
 */
@Service
public class UserPartyFilesServiceImpl implements IUserPartyFilesService 
{
    @Autowired
    private UserPartyFilesMapper userPartyFilesMapper;

    /**
     * 查询党员发展文件
     * 
     * @param userId 党员发展文件主键
     * @return 党员发展文件
     */
    @Override
    public UserPartyFiles selectUserPartyFilesByUserId(Long recordId)
    {
        return userPartyFilesMapper.selectUserPartyFilesByUserId(recordId);
    }

    /**
     * 查询党员发展文件列表
     * 
     * @param userPartyFiles 党员发展文件
     * @return 党员发展文件
     */
    @Override
    public List<UserPartyFiles> selectUserPartyFilesList(UserPartyFiles userPartyFiles)
    {
        return userPartyFilesMapper.selectUserPartyFilesList(userPartyFiles);
    }

    /**
     * 新增党员发展文件
     * 
     * @param userPartyFiles 党员发展文件
     * @return 结果
     */
    @Override
    public int insertUserPartyFiles(UserPartyFiles userPartyFiles)
    {
        return userPartyFilesMapper.insertUserPartyFiles(userPartyFiles);
    }

    /**
     * 修改党员发展文件
     * 
     * @param userPartyFiles 党员发展文件
     * @return 结果
     */
    @Override
    public int updateUserPartyFiles(UserPartyFiles userPartyFiles)
    {
        return userPartyFilesMapper.updateUserPartyFiles(userPartyFiles);
    }
    
    @Override
    public int updateCheckStatus(UserPartyFiles userPartyFiles)
    {
        return userPartyFilesMapper.updateCheckStatus(userPartyFiles);
    }
    

    /**
     * 批量删除党员发展文件
     * 
     * @param userIds 需要删除的党员发展文件主键
     * @return 结果
     */
    @Override
    public int deleteUserPartyFilesByUserIds(Long[] userIds)
    {
        return userPartyFilesMapper.deleteUserPartyFilesByUserIds(userIds);
    }

    /**
     * 删除党员发展文件信息
     * 
     * @param userId 党员发展文件主键
     * @return 结果
     */
    @Override
    public int deleteUserPartyFilesByUserId(Long userId)
    {
        return userPartyFilesMapper.deleteUserPartyFilesByUserId(userId);
    }
}
